﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using log4net;
using log4net.Config;

[assembly: log4net.Config.XmlConfigurator(Watch = true)]

namespace UsbGuard.Logger
{
    public static class CLog
    {

        private static readonly ILog log = LogManager.GetLogger("USB-Guard");//typeof(Logging));

        


        //Gibt an ob Log4Net bereits initialisiert wurde
        private static bool configured = false;

        

        public static ILog logger
        {
            get
            {
                if(configured)
                {                                                           //Achtung: Hard coded wo die Konfiguration liegt.hg
                log4net.Config.XmlConfigurator.Configure(new System.IO.FileInfo("C:\\logs\\log.xml"));
                //LogManager.GetLogger(typeof(Logging));
                }
                configured = false;
                return log;
            }
        }

        
    }
}
